import {CURRENT_ADDRESS} from "./actionsTypes";

export const currentAddress = data => ({type: CURRENT_ADDRESS, data: data});//地址列表
import commonAction from '../../../../js/actions/commonAction';

export const getAddAddressList = (data, callBack) => {
    return commonAction.simplePost(data, 'emsc-partner/b/a/gal', undefined, callBack);
};

export const setDefaultAddress = (data, callBack) => {
    return commonAction.simplePost(data, 'emsc-partner/b/a/default', undefined, callBack);
};


//获取默认地址
export const getDefaultAddress=(data,callBack)=>{
    return commonAction.simplePost(data,'emsc-partner/b/a/q/default',currentAddress,callBack);
};

//删除地址
export const deleteAddress=(data,callBack)=>{
    return commonAction.simplePost(data,'emsc-partner/b/a/dl',currentAddress,callBack);
};
